using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MapControl;
using MapControl.Misc;

namespace GPSMap
{
    public partial class frmGPSInfo : Form
    {
        public frmGPSInfo(frmGPSTracking frm)
        {
            InitializeComponent();
            formMain = frm;
        }
        public void ShowInfo(GPSPoint gpsPoint)
        {
            txtLocalTime.Text = gpsPoint.LocalTime.ToString("dd/MM/yyyy HH:mm:ss");
            txtName.Text = gpsPoint.Name;
            txtLon.Text = GeneralClass.DecimalToDMS(gpsPoint.LonGPS);
            txtLat.Text = GeneralClass.DecimalToDMS(gpsPoint.LatGPS);
            txtAlt.Text = gpsPoint.Alt.ToString();
            txtSpeed.Text = gpsPoint.Speed.ToString();
            txtAngle.Text = gpsPoint.Angle.ToString();
        }
        private void frmGPSInfo_Load(object sender, EventArgs e)
        {

        }

        private frmGPSTracking formMain;
        private void frmGPSInfo_FormClosing(object sender, FormClosingEventArgs e)
        {
            formMain.IsShowGPSInfo(false);
        }
    }
}